package mockup;

import java.io.Serializable;

/**
 * The reservation for an appointment
 * @author daniel
 * @author Erik
 */

public class ReservationMockup extends Mockup implements Serializable {

	//Per now it is possible to reserve an appointment over several days
	private AppointmentMockup appointment;
	private long startTime;
	private long endTime;
	private int roomID = -1;

	/**
	 * The constructor
	 * @param start The start of the reservation
	 * @param end The end of the reservation
	 */
	public ReservationMockup(int id, long start, long end) {
		super(id);
		setStartTime(start);
		setEndTime(end);
	}

	/**
	 * The constructor
	 * @param startTime The start of the reservation
	 * @param endTime The end of the reservation
	 * @param roomID Where the reservation is at (optional)
	 */
	public ReservationMockup(int id, long startTime, long endTime,
			int roomID) {
		this(id, startTime, endTime);
		this.roomID = roomID;
	}

	/**
	 * Updates all the information at once.
	 * @param startTime
	 * @param endTime
	 * @param roomID
	 */
	public void updateAll(long startTime, long endTime,
			int roomID) {
		setStartTime(startTime);
		setEndTime(endTime);
		setRoomID(roomID);
	}

	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public long getEndTime() {
		return endTime;
	}

	public void setEndTime(long endTime) {
		this.endTime = endTime;
	}

	public int getRoomID() {
		return roomID;
	}

	public AppointmentMockup getAppointment() {
		return appointment;
	}

	public void setAppointment(AppointmentMockup appointment) {
		this.appointment = appointment;
	}

	public void setRoomID(int roomID) {
		this.roomID = roomID;
	}
}